package org.glow.changgou.user.feign;

import org.glow.changgou.entity.Result;
import org.glow.changgou.user.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author Glow
 * @Date 2022-10-05 15:59:06
 * @Description 用户登录认证信息加载
 * @Version 1.0
 */
@FeignClient(name = "user")
@RequestMapping("/user")
public interface UserFeign {
    @GetMapping("/load/{id}")
    Result<User> findById(@PathVariable String id);
    /***
     * 添加用户积分
     * @param points
     * @return
     */
    @GetMapping(value = "/points/add")
    Result addPoints(@RequestParam(value = "points")Integer points);
}
